<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                xmlns:p="http://primefaces.org/ui"
                xmlns:f="http://xmlns.jcp.org/jsf/core">


    <p:dataTable var="item" value="#{problemViewMB.solutionlist}" paginator="true" rows="5"
                 paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"
                 rowsPerPageTemplate="5,10,15"   id="solutionTable"  >
        <p:column headerText="#{bundle.id}" sortBy="#{item.idsolution}" filterBy="#{item.idsolution}">
            <h:outputText value="#{item.idsolution}" />
        </p:column>
        <p:column headerText="#{bundle.date}" sortBy="#{item.createdate}" filterBy="#{item.createdate}">
            <h:outputText value="#{item.createdate}">
                <f:convertDateTime pattern="YYYY/MM/dd HH:mm:ss" />
            </h:outputText>
        </p:column>
        <p:column headerText="#{bundle.tranCost}" sortBy="#{item.tranCost}" filterBy="#{item.tranCost}">
            <h:outputText value="#{item.tranCost}">
                <f:convertNumber type="number"  />
            </h:outputText>
        </p:column>
        <p:column headerText="#{bundle.timeCost}" sortBy="#{item.timeCost}" filterBy="#{item.timeCost}">
            <h:outputText value="#{item.timeCost}">
                <f:convertNumber type="number"  />
            </h:outputText>
        </p:column>
        <p:column headerText="#{bundle.dispatchCost}" sortBy="#{item.dispatchCost}" filterBy="#{item.dispatchCost}">
            <h:outputText value="#{item.dispatchCost}">
                <f:convertNumber type="number" />
            </h:outputText>
        </p:column>
        <p:column headerText="#{bundle.status}" sortBy="#{item.state}" filterBy="#{item.state}">
            <h:outputText value="#{item.state}" converter="#{stateConvert}">
                 
            </h:outputText>
        </p:column>
        <p:column style="width: 20%;text-align: center;">
            <f:facet name="header">
                <h:outputText value="#{bundle.operation}"/>
                <!--<shiro:hasPermission name="user:C">--> 
                <p:commandButton value="#{bundle.calculate}" action="#{problemViewMB.calculate()}" update=":growl,solutionTable" style="margin-left: 15px" icon="ui-icon-plus">
                </p:commandButton>
                <!--</shiro:hasPermission>-->
            </f:facet>
            <p:button value="#{bundle.view}" outcome="/admin/solution/view.xhtml" >
                <f:param name="idsolution" value="#{item.idsolution}" />
            </p:button>
            <!--<shiro:hasPermission name="user:D">--> 
            <p:commandButton value="#{bundle.delete}" action=" " update=":form,:growl" >
                <p:confirm header="#{bundle.delete}" message="#{bundle.deleteAlert}" icon="ui-icon-alert" />
            </p:commandButton>
            <!--</shiro:hasPermission>-->
        </p:column>
    </p:dataTable>
    <p:blockUI block="solutionTable" trigger="solutionTable">
        LOADING<br />
        <p:graphicImage name="img/ajaxloadingbar.gif"/>
    </p:blockUI>


</ui:composition>

